#include "SphereSpirit.hpp"

namespace Eyer {

    MVPSphere * SphereSpirit::mvpSphere = nullptr;

    int SphereSpirit::RenderInit() {
        if(mvpSphere == nullptr){
            mvpSphere = new MVPSphere();
        }
        return 0;
    }

    int SphereSpirit::RenderDestory() {
        /*
        if (mvpSphere != nullptr) {
            delete mvpSphere;
            mvpSphere = nullptr;
        }
        */
        return 0;
    }

    int SphereSpirit::RenderContent(EatrixF4x4 &vp, EyerKey &key) {
        mvpSphere->SetVP(vp);
        mvpSphere->SetColor(key.color.x(), key.color.y(), key.color.z(), key.color.w());
        mvpSphere->SetModel(key.position, key.rotato, key.scale);
        mvpSphere->Draw();
        return 0;
    }
}